package flint04
{
	import flash.display.Bitmap;
	
	import org.flintparticles.common.actions.Age;
	import org.flintparticles.common.counters.Blast;
	import org.flintparticles.common.energyEasing.Quadratic;
	import org.flintparticles.common.initializers.ColorInit;
	import org.flintparticles.common.initializers.Lifetime;
	import org.flintparticles.twoD.actions.TweenToZone;
	import org.flintparticles.twoD.emitters.Emitter2D;
	import org.flintparticles.twoD.initializers.Position;
	import org.flintparticles.twoD.zones.BitmapDataZone;
	
	public class EmitterBlast extends Emitter2D{
		
		public function EmitterBlast(numberOfParticles:uint,bitmap1:Bitmap,bitmap2:Bitmap){

			counter = new Blast( numberOfParticles );
			
			addInitializer( new ColorInit( 0xFFFFFF00, 0xCC6600 ) );
			addInitializer( new Lifetime( 6 ) );
			addInitializer( new Position( new BitmapDataZone( bitmap1.bitmapData, 0,0 ) ) );
			
			addAction( new Age( Quadratic.easeInOut ) );
			addAction( new TweenToZone( new BitmapDataZone( bitmap2.bitmapData, 0,0 ) ) );

			
		}
	}
}